{% extends "nav.html" %}
{% block little %}主机信息{% endblock %}
{% block content %}
    <!-- Main Content -->
    <div class="container-fluid">
        <div class="side-body">
            <div class="page-title">
                <span class="title">主机信息查看</span>
                <div class="description">网服所有主机信息查看</div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <div class="card">
                        <div class="card-header">

                            <div class="card-title">
                                <div class="title">主机列表</div>
                            </div>
                        </div>
                        <div class="card-body">
                            <table class="datatable table table-striped table-hover" cellspacing="0" width="100%">
                                <thead>
                                <tr>
                                    <th>id</th>
                                    <th>厂商</th>
                                    <th>型号</th>
                                    <th>sn</th>
                                    <th>地址</th>
                                    <th>主机名称</th>
                                    <th>业务系统</th>
                                    <th>业务类型</th>
                                    <th>设备wwn</th>
                                    <th>机房位置</th>
                                </tr>
                                </thead>
                                <tfoot>
                                <tr>
                                    <th>id</th>
                                    <th>厂商</th>
                                    <th>型号</th>
                                    <th>sn</th>
                                    <th>地址</th>
                                    <th>主机名称</th>
                                    <th>业务系统</th>
                                    <th>业务类型</th>
                                    <th>设备wwn</th>
                                    <th>机房位置</th>
                                </tr>
                                </tfoot>
                                <tbody>
                                {% for i in data %}
                                    <tr>
                                        <td>{{ i.id }}</td>
                                        <td>{{ i.prodname }}</td>
                                        <td>{{ i.prodect }}</td>
                                        <td>{{ i.sn }}</td>
                                        <td>{{ i.ip }}</td>
                                        <td>{{ i.hostname }}</td>
                                        <td>{{ i.app }}</td>
                                        <td>{{ i.apptype }}</td>
                                        <td>
                                            {% for k in  i.wwn_set.all%}
                                                <a>{{ k.wwn }}  <a style="color: #e50011">{{ k.Sanport_wwn.san }}</a>   </a>
                                            {% endfor %}
                                        </td>
                                        <td>{{ i.position }}</td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block js %}

{% endblock %}